#字典生成式
import random
d = {item:random.randint(1,100) for item in range(4)}
print(d) #0-3作为key,1-100之间的随机数作为值

#zip映射
lst = [1001,1002,1004,1004]
lst2 = ['张三','李四','王二','麻子']
d2 = {k:v for k,v in zip(lst,lst2)}
print(d2) #{1001: '张三', 1002: '李四', 1004: '麻子'}